package cn.tedu.exercise;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

/**
 * @author :Colin
 * @version 创建时间: 2021/6/19 9:18
 */
public class TestEncode {
    public static void main(String[] args) {
        OutputStreamWriter out = null;
        try{
            out = new OutputStreamWriter(new FileOutputStream("d:\\punk\\1.txt"),"iso-8859-1");
            out.write("农夫山泉");
        }catch(Exception e){
           e.printStackTrace();
        }finally{
            try {
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

